<?php

// 查询所有数据响应给前端
include('../config.php');

$sql = "select * from shop";

$res = mysql_query($sql);

$shop = array();
while ($row = mysql_fetch_assoc($res)) {
    array_push($shop, $row);
}

echo json_encode(array(
    "code" => 200,
    "body" => array(
        "list" => $shop
    )
));

?>